package com.ruoyi.project.module.xianhua.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.xianhua.mapper.XianhuaMapper;
import com.ruoyi.project.module.xianhua.domain.Xianhua;
import com.ruoyi.project.module.xianhua.service.IXianhuaService;
import com.ruoyi.common.support.Convert;

/**
 * 鲜花 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-12
 */
@Service
public class XianhuaServiceImpl implements IXianhuaService 
{
	@Autowired
	private XianhuaMapper xianhuaMapper;

	/**
     * 查询鲜花信息
     * 
     * @param userId 鲜花ID
     * @return 鲜花信息
     */
    @Override
	public Xianhua selectXianhuaById(Integer userId)
	{
	    return xianhuaMapper.selectXianhuaById(userId);
	}
	
	/**
     * 查询鲜花列表
     * 
     * @param xianhua 鲜花信息
     * @return 鲜花集合
     */
	@Override
	public List<Xianhua> selectXianhuaList(Xianhua xianhua)
	{
	    return xianhuaMapper.selectXianhuaList(xianhua);
	}
	
    /**
     * 新增鲜花
     * 
     * @param xianhua 鲜花信息
     * @return 结果
     */
	@Override
	public int insertXianhua(Xianhua xianhua)
	{
	    return xianhuaMapper.insertXianhua(xianhua);
	}
	
	/**
     * 修改鲜花
     * 
     * @param xianhua 鲜花信息
     * @return 结果
     */
	@Override
	public int updateXianhua(Xianhua xianhua)
	{
	    return xianhuaMapper.updateXianhua(xianhua);
	}

	/**
     * 删除鲜花对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteXianhuaByIds(String ids)
	{
		return xianhuaMapper.deleteXianhuaByIds(Convert.toStrArray(ids));
	}
	
}
